#!/usr/bin/env python
# -*- coding:utf-8 -*-
import os
import datetime

import sys

import django



base_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(base_dir)
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "Bug.settings")
django.setup()  # os.environ['DJANGO_SETTINGS_MODULE']

from web import models




date1=datetime.date.today()
start= date1.strftime("%Y-%m-%d")+" 00:00:00"
end=date1.strftime("%Y-%m-%d")+" 23:59:59"
starttime = datetime.datetime.strptime(start, "%Y-%m-%d %H:%M:%S")
endtime=datetime.datetime.strptime(end, "%Y-%m-%d %H:%M:%S")
print(starttime,endtime)
v=models.guser.objects.filter(org_id="BDKJ")
m=models.clock.objects.filter(nowdate__gt=datetime.datetime.now()).filter(org_id="BDKJ")
print(v.values_list("org_id__org_id"))
